// Package supports 包裹goroutine方法封装
package supports

import (
	"sync"
)

// Wrapper struct
type Wrapper struct {
	sync.WaitGroup
}

// Wrap func
func (w *Wrapper) Wrap(cb func()) {
	w.Add(1)
	go func() {
		cb()
		w.Done()
	}()
}
